_Pragma("once");

#include "BasicDevice.h"
#include "buzzer.h"
#include "KeyCode.h"
#include "common.h"

class Keypad : public BasicDevice {
public:
    friend class SingletonTemplate<Keypad>;


    ~Keypad();
    void listen();

protected:
    Keypad();

    void readKey(int sig);

    static void readKeyDevice(int sig);

    Buzzer& buzzer;
    typename WorkerBase::PoolType* const mpool;
};

// extern template class SingletonTemplate<Keypad>;
using KeypadSingleton = SingletonTemplate<Keypad>;


